<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	%>
	<%@ page import="cn.edu.cqupt.cxcy.dto.TeamImpl" %>
	<%@ page import="cn.edu.cqupt.cxcy.model.*" %>
<%
	String basepath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ request.getContextPath() + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basepath %>"/>
<meta charset="utf-8">
<title>团队信息</title>
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
<script type="text/javascript" src="js/Team.js"></script>
<link rel="stylesheet" type="text/css" href="css/Team.css" />
<link rel="stylesheet" type="text/css" href="css/Tteam.css" />
<script type="text/javascript" src="js/jq-pjax.js"></script>
<link rel="stylesheet" type="text/css"  href="umeditor/themes/default/css/ueditor.min.css">
<script type="text/javascript" src="umeditor/ueditor.config.js"></script>
<script type="text/javascript" src="umeditor/ueditor.all.min.js"></script>
<script type="text/javascript" src="umeditor/lang/zh-cn/zh-cn.js"></script>

</head>

<body>
<%
int sum_count = 0;//团队的成员总数
int sum_pages = 1;//总的分页数
int current_page = 1;//分页的当前页码数
List<Object> members = null;//团队成员的信息
if(request.getAttribute("count") != null){
	sum_count = Integer.parseInt(String.valueOf(request.getAttribute("count")));
    if(sum_count % 10 == 0){
    	sum_pages = sum_count/10;
    }else{
    	sum_pages = sum_count/10+1;
    }
}

if(request.getAttribute("members") != null){
	members = (List<Object>)request.getAttribute("members");
}%>
	<div class="top" id="top">
		<a href="index"><img src="img/logo.png" alt="重庆邮电大学" /></a>
		<div>
			<p>欢迎您！<b>${sessionScope.user.get(0)}</b>|<a href="index">返回首页</a>|<a href="loginout">注销</a></p>
		</div>	
	</div>
<!-- 	<div id="header">
		<div class="header_wrapper">
			<div class="header_wrapper_left">
				<div class="header_wrapper_left_left">创业团队</div>
				<div class="header_wrapper_left_right">
					<p>BUSINESS TEAM</p>
					<span>HI BUSINESS.LET YOU BECOME A SUCCESS</span>
				</div>
			</div> 
			<div class="header_wrapper_right">
				<div class="header_wrapper_right_word">当前的位置：管理中心>创业团队</div>
					<div class="header_wrapper_right_pic"><a href=""><img src="img/btn.png"></a></div>
			</div>
		</div>
	</div> -->
	<div id="body">
	<div class="body_wrapper">
		<div class="body_wrapper_center">
			<div class="body_wrapper_center_left">
				<div class="body_wrapper_center_left_title">BUSINESS TEAM<span>创业团队</span></div>
				<ul>
					<li><span></span><a class="turn_pjax" href="team/member">成员管理</a></li>
					<li><span></span><a  class="turn_pjax" href="team/tutor"> 团队导师</a></li>
					<li><span></span><a class="turn_pjax" href="team/pubpro">发布项目</a></li>
					<li><span></span><a class="turn_pjax" href="team/team">团队信息</a></li>
					<!-- <li><span></span><a class="turn_pjax" href="team/addinfo">团队介绍</a></li> -->
				</ul>
			</div>
			<div class="body_wrapper_center_right" id="main_right">
				<div class="right_wrapper">
				<div class="right_wrapper_top">
					团队成员人数：<span><%=TeamImpl.currentPageSum(sum_count, current_page, sum_pages) %></span> / <span><%=sum_count %></span>
					<div class="right_wrapper_top_div">
						<a href="" class="right_wrapper_top_div_a1">添加成员</a>
						<a href="javascript:deleteTeam();" class="right_wrapper_top_div_a2">删除成员</a>
					</div>
				</div>
				<div class="right_wrapper_middle">
				<div class="add_teamer">
					
				</div>	
					<table>
						<thead>
						<tr>
							<td><input type="checkbox" /></td>
							<td>编号</td>
							<td>姓名</td>
							<td>性别</td>
							<td>职务</td>
							<td>联系方式</td>
						</tr>
						</thead>
						<tbody>
						<%
						if(members != null){
						for(int i = 0;i<members.size();i+=2){
							int id = i/2+1;
							Member member = (Member)members.get(i);
							Teamunite teamunite = (Teamunite)members.get(i+1);
						%>
						<tr>
							<td><input type="checkbox" /></td>
							<td><%=id %></td>
							<td><%=member.getM_name() %></td>
							<td><%=member.getM_sex() %></td>
							<td><%=teamunite.getTun_type() %></td>
							<td><%=member.getM_tel() %></td>
						</tr>
						<%} 
						}%>
						</tbody>
					</table>
				</div>
				</div>
				<div class="body_wrapper_center_right_pages">
					<a href="javascript:pageSlipPre();" class="right_pages_left">&lt;</a>
					<a href="javascript:pageSlipchoose(1);" class="right_page_current">1</a>
					<a href="javascript:pageSlipchoose(2);" class="right_pages_margin">2</a>
					<a href="javascript:pageSlipchoose(3);" class="right_pages_margin">3</a>
					<a href="javascript:pageSlipchoose(4);" class="right_pages_margin">4</a>
					<a href="javascript:pageSlipchoose(5);" class="right_pages_margin">5</a>
					<a href="javascript:pageSlipNxt();" class="right_pages_right">&gt;</a>
				</div>
			</div>
		</div>
		
		<div id="body_wrapper_footer">
			<div class="body_wrapper_footer_statement"><span>重庆邮电大学创业创新基地</span><span>版权所有 2015</span>   <span>Copyright ©cqupt.cn. All Rights Reserved. </span>
			</div>
		</div>
	</div>
	</div>	

<script type="text/javascript">
	$(function(){
	  $(document).pjax("a.turn_pjax","#main_right");
	 
	})
	<% if(request.getAttribute("pjax_back") != null && !request.getAttribute("pjax_back").equals("")) {%> 
			<%=(String)request.getAttribute("pjax_back") %>
	<% } %>
</script>
</body>
</html>